home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / serien / purity / nr.46 / stinglibpcq / english / string.lib.doc < prev    next >
Text File  |  1995-03-27  |  5KB  |  132 lines

  1.  
  2.  
  3.  
  4.                                 String.Lib v1.0
  5.  
  6.                          an help using strings with PCQ
  7.  
  8.                       Copyright (C) 1995 by Michel Tournay
  9.  
  10.                                utilisation guide
  11.  
  12.  
  13.  
  14.  
  15.  
  16.       WARNING
  17.  
  18.       String.lib v1.0 have a copyright but :
  19.  
  20.             -  you could distribute it in your own collection if all files
  21.                are include
  22.  
  23.       joinlib                    108      joinlib.sh                 30
  24.       makeo                      151      makeo.sh                   133
  25.       string.lib                 1696
  26.       Source/Copy.p              259      Source/CPos.p              559
  27.       Source/Delete.p            330      Source/Free.p              330
  28.       Source/Insert.p            384      Source/Lower.p             222
  29.       Source/Upper.p             222      Object/Copy.o              188
  30.       Object/CPos.o              252      Object/Delete.o            288
  31.       Object/Free.o              168      Object/Insert.o            352
  32.       Object/Lower.o             224      Object/Upper.o             224
  33.       Francais/Essai_Str_C_Pos   5564     Francais/Essai_Str_C_Pos.p 352
  34.       Francais/string.i          1790     Francais/string.lib.doc    5975
  35.       English/Trial_Str_C_Pos    5556     English/Trial_Str_C_Pos.p  344
  36.       English/string.i           1630     English/string.lib.doc     5055
  37.  
  38.                and if you don't ask more than 6 USD or equivalent in your
  39.                country.
  40.  
  41.             -  you could modify it and distribute this new version but with
  42.                a new version number and the history complete. If you want,
  43.                you have the right to send your new version to the old author!
  44.  
  45.       I use String.Lib in many progs and the functions had been tested but
  46.    I could not certifiate that there's no bugs. In fact there is no, but...
  47.    So I could not be responsable of any damages on your files.
  48.  
  49.  
  50.  
  51.  
  52.  
  53.       Pat Quaid said in the doc of the compiler that it does not manipulate
  54.    strings very well and don't have the good functions of Borland's Turbo
  55.    Pascal. So I have decided to wrote those functions.
  56.  
  57.       They are under a runtime library form who had to be link to your prog
  58.    with BLink (LIB option). The descriptions of the functions are in the
  59.    string.i file wich best place is, for my mind, in the include:utils
  60.    directory.
  61.  
  62.       The lybrary's functions are preceded of 'Str_' in order to avoid
  63.    name conflict with other functions. There is three functions comming from
  64.    Borland's language : Copy, Delete and Insert ; two usefull fonction I
  65.    decide to include because they are very practical (but not very hard to
  66.    do) : Lower and Upper ; and a very very usefull function but it seems to
  67.    be a little harder than the two lasts : Str_C_Pos.
  68.  
  69.       All the functions allocate themself the memory for the returned string
  70.    so you don't have to think about it. But in fact there is a restriction :
  71.    you can not make something like :
  72.  
  73.             s := Str_Copy(s,10,10);
  74.  
  75.       because in memory you always have the primal string without any pointer
  76.    to access it! So make something like :
  77.  
  78.             a := s;
  79.             s := Str_Copy(s,10,10);
  80.             freestring(a);
  81.  
  82.  
  83.  
  84.  
  85.  
  86.       EXAMPLES
  87.  
  88.                         /------------------------------\
  89.                         | Function   | input  | output |
  90.                         |------------+--------+--------|
  91.                         | Str_Lower  | ABCDEF | abcdef |
  92.                         |------------+--------+--------|
  93.                         | Str_Upper  | abcedf | ABCDEF |
  94.                         |------------+--------+--------|
  95.                         | Str_Copy   | abcdef | cd     |
  96.                         |            | 3      |        |
  97.                         |            | 2      |        |
  98.                         |------------+--------+--------|
  99.                         | Str_Delete | abcdef | abef   |
  100.                         |            | 3      |        |
  101.                         |            | 2      |        |
  102.                         |------------+--------+--------|
  103.                         | Str_Insert | abef   | abcdef |
  104.                         |            | cd     |        |
  105.                         |            | 3      |        |
  106.                         \------------------------------/
  107.  
  108.  
  109.  
  110.  
  111.  
  112.       I hope that those little functions would help you manipulating strings.
  113.    Don't hesitate to contact me. And I'm sorry for my poor english...
  114.  
  115.  
  116.  
  117.  
  118.  
  119. ------------------------------------------------------------------------------
  120. String.Lib v1.0                                                     1696 bytes
  121.  
  122.                    First distributed version. No known bugs.
  123.  
  124.                             author : Michel Tournay
  125.                                      27 ru felix pres
  126.                                      08600 Fromelennes
  127.                                      FRANCE
  128.  
  129.                                      MichelT@email.teaser.com
  130.  
  131. ------------------------------------------------------------------------------
  132.